package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 菜品口味接口
 *
 * @author guozh
 */
@Mapper
public interface DishFlavorMapper {
    /**
     * 增加菜品口味
     *
     * @param flavors 菜品口味
     */
    void insertFlavors(List<DishFlavor> flavors);

    /**
     * 根据主键删除菜品数据
     *
     * @param dishIds ids
     */
    void deleteByDishId(List<Long> dishIds);

    /**
     * 根据id查询菜品口味
     *
     * @param dishId dishId
     * @return List<DishFlavor>
     */
    @Select("select  * from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> selectByDishId(Long dishId);
}
